<template>
    
   <el-button type="primary" :icon="Edit" @click="dialogFormVisible = true"/>

    <el-dialog v-model="dialogFormVisible" title="管理员信息修改">
  
 <div>
  <el-form :model="form" label-width="120px">
    <el-form-item label="姓名">
      <el-input v-model="form.name" />
    </el-form-item>
    <el-form-item label="密码">
      <el-input v-model="form.pwd" show-password/>
    </el-form-item>
   
    <el-form-item label="账号是否有效">
      <el-radio-group v-model="form.status">
        <el-radio label="有效" border />
        <el-radio label="无效" border />
      </el-radio-group>
    </el-form-item>
     <el-form-item label="在线状态">
      <el-radio-group v-model="form.online">
        <el-radio label="在线" border />
        <el-radio label="下线" border />
      </el-radio-group>
    </el-form-item>
    
    
    <!-- <el-form-item label="创建时间">
      <el-col :span="11">
        <el-date-picker
          v-model="form.start1"
          type="date"
          placeholder="选择年月日"
          style="width: 100%"
        />
      </el-col>
      <el-col :span="2" class="text-center">
        <span class="text-gray-500">-</span>
      </el-col>
      <el-col :span="11">
        <el-time-picker
          v-model="form.start2"
          placeholder="选择时间"
          style="width: 100%"
        />
      </el-col>
    </el-form-item>

     <el-form-item label="更新时间">
      <el-col :span="11">
        <el-date-picker
          v-model="form.end1"
          type="date"
          placeholder="选择年月日"
          style="width: 100%"
        />
      </el-col>
      <el-col :span="2" class="text-center">
        <span class="text-gray-500">-</span>
      </el-col>
      <el-col :span="11">
        <el-time-picker
          v-model="form.end2"
          placeholder="选择时间"
          style="width: 100%"
        />
      </el-col>
    </el-form-item> -->
   
    <!-- <el-form-item>
      <el-button type="primary" @click="open2">创建</el-button>
      <el-button>取消</el-button>
    </el-form-item>
     -->
  </el-form>

  
 </div>
      
      
  
      <template #footer>
        <span class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取消</el-button>
        <el-button type="primary" @click="doLogin">确定</el-button>
        </span>
      </template>
    </el-dialog>
  </template>
  
  <script lang="ts" setup>
  //将全局对象的axios提取出来，通过inject
  import { reactive, ref,inject} from 'vue'
  import { ElMessage } from 'element-plus'
 
  import {
  Check,
  Delete,
  Edit,
  Message,
  Search,
  Star,
  
} from '@element-plus/icons-vue'
 
  const input2 = ref('')
  const dialogFormVisible = ref(false) //基本数据类型
  // const doLogin = ref(false)
  const formLabelWidth = '140px'
  
  

  const  form = reactive({
    // account: '',
    // password: '',
    // check:'',
    name: '',
    pwd:'',
    status:'',
    online:'',
    // start1: '',
    // start2: '',
    // end1: '',
    // end2: '',
  })
  
//   const open2 = () => {
//   ElMessage({
//     message: '修改成功',
//     type: 'success',
//   })
// }

const doLogin = ()=>{

}
  </script>
  
  <style scoped>
  .el-button--text {
    margin-right: 15px;
  }
  .el-select {
    width: 300px;
  }
  .el-input {
    width: 300px;
  }
  .dialog-footer button:first-child {
    margin-right: 10px;
  }
 
  </style>
  